﻿@{
    Layout = null;
}
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
<link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

@Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
    )
@Html.DevExpress().GetScripts(
            new Script { ExtensionType = ExtensionType.ListBox }
    )

    <script type="text/javascript">
        function OK() {
            var node = LeftTreeView.GetSelectedNode();
            if (null == node) {
                alert("请选择人员！");
            } else if (node.name.indexOf("^_^") == 0) {
                alert("选择部门无效，请选择人员！");
            } else {
                parent.EmpOK(node.name, node.GetText());
            }

        }

    </script>
</head>
<body>
    @Html.DevExpress().TreeView(settings =>
{
    settings.Name = "LeftTreeView";
    settings.ShowTreeLines = true;
    settings.AllowSelectNode = true;
    settings.NameField = "Id";
    settings.TextField = "Name";
    settings.EnableClientSideAPI = true;
    settings.EnableAnimation = false;
    settings.PreRender = (source, e) =>
    {
        ASPxTreeView treeView = (ASPxTreeView)source;
        //treeView.ExpandAll();
    };

}).Bind(Model).GetHtml()

    <script>
        lp.Hide();
    </script>

</body>
</html>
